<template>
  <div id="box">
    <div id="echarts"></div>
    <router-view>
    </router-view>
  </div>
</template>
<script>
import * as echarts from 'echarts'

const obj ={
  title:{
    text: '小U商城订单数据总览'
  },
  tooltip:{},
  xAxis:{
    data:['笔记本','手机','冰箱','洗衣机','衬衫','家具','生活用品']
  },
  yAxis:{
  },
  series:[{
    name:'销量',
    type:'bar',
    data:['200','300','220','55','90','76','58']
  }]
}

export default {
  mounted(){
    var myEchart = echarts.init(document.getElementById('echarts'))
    myEchart.setOption(obj)
  }
}
</script>
<style lang="less" scoped>
#box{
  width: 100%;
  height: 100%;
  #echarts{
    margin-top: 150px;
    width: 100%;
    height: 50%;
  } 
}
</style>
